home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1468 / countdwn.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-07-20  |  2.7 KB  |  96 lines

  1. VERSION 4.00
  2. Begin VB.Form CountDown 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Countdown"
  6.    ClientHeight    =   2970
  7.    ClientLeft      =   6555
  8.    ClientTop       =   4020
  9.    ClientWidth     =   1995
  10.    ControlBox      =   0   'False
  11.    Height          =   3375
  12.    Icon            =   "CountDwn.frx":0000
  13.    Left            =   6495
  14.    LinkTopic       =   "Form1"
  15.    LockControls    =   -1  'True
  16.    MaxButton       =   0   'False
  17.    MinButton       =   0   'False
  18.    ScaleHeight     =   2970
  19.    ScaleWidth      =   1995
  20.    ShowInTaskbar   =   0   'False
  21.    Top             =   3675
  22.    Width           =   2115
  23.    Begin VB.Timer Timer2 
  24.       Enabled         =   0   'False
  25.       Interval        =   1
  26.       Left            =   2940
  27.       Top             =   3780
  28.    End
  29.    Begin VB.Timer Timer1 
  30.       Interval        =   1000
  31.       Left            =   3480
  32.       Top             =   3780
  33.    End
  34.    Begin VB.PictureBox picLCD 
  35.       BorderStyle     =   0  'None
  36.       Height          =   495
  37.       Left            =   1260
  38.       ScaleHeight     =   495
  39.       ScaleWidth      =   555
  40.       TabIndex        =   0
  41.       Top             =   2430
  42.       Width           =   555
  43.    End
  44.    Begin VB.Image Image1 
  45.       Height          =   480
  46.       Left            =   720
  47.       Picture         =   "CountDwn.frx":000C
  48.       Top             =   2340
  49.       Width           =   480
  50.    End
  51.    Begin VB.Image Image2 
  52.       Height          =   480
  53.       Left            =   120
  54.       Picture         =   "CountDwn.frx":044E
  55.       Top             =   2340
  56.       Visible         =   0   'False
  57.       Width           =   480
  58.    End
  59. Attribute VB_Name = "CountDown"
  60. Attribute VB_Creatable = False
  61. Attribute VB_Exposed = False
  62. Option Explicit
  63. Dim moLCD As New CLCD
  64. Private Sub Form_Load()
  65.     With moLCD
  66.         .ShowUnlitSegments = True
  67.         .ForeColor = vbBlue
  68.         Set .Container = picLCD
  69.         .Caption = "10"
  70.     End With
  71. End Sub
  72. Private Sub Form_Unload(Cancel As Integer)
  73.     Set moLCD = Nothing
  74.     Set CountDown = Nothing
  75. End Sub
  76. Private Sub Timer1_Timer()
  77. ' Note the Evil Type Coercion.
  78.    moLCD.Caption = moLCD.Caption - 1
  79.     Select Case moLCD.Caption
  80.         Case 2: Image2.Visible = True
  81.         Case 0: Image2.Visible = False
  82.                 Timer1.Enabled = False
  83.                 Timer2.Enabled = True
  84.     End Select
  85.     If moLCD.Caption = 0 Then
  86.         Timer1.Enabled = False
  87.         Timer2.Enabled = True
  88.     End If
  89. End Sub
  90. Private Sub Timer2_Timer()
  91.     With Image1
  92.         .Top = .Top - (Image1.Height * 0.1)
  93.         If .Top < -Image1.Height Then Unload Me
  94.     End With
  95. End Sub
  96.